//
//  NSObject+Category.h
//  VICategory
//
//  Created by MN on 2022/8/19.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSObject (Category)
//类名
- (NSString *)tt_className;
+ (NSString *)tt_className;

/// 打开系统设置
- (void)openSystemSettings;

/// 获取缓存
- (NSString *)getCacheSize;

/// 获取系统版本号
- (NSString *)getAppVersion;

///获取app名字
- (NSString *)getAppName;

/// 获取顶层控制器
+ (UIViewController *)getTopController;

/// 刷新缓存(获取alert消失的回调，针对无法获取点击事件的情况)
- (void)alertRefreshCache:(void (^) (void))refreshBlock;

- (NSAttributedString *)attributedText:(NSArray *)strings colors:(NSArray *)colors;

// 读取本地JSON文件
- (NSArray *)vi_readLocalFileWithName:(NSString *)name;

+ (void)vi_userDefaultsSave:(nullable id)object key:(NSString *)key;
- (void)vi_userDefaultsSave:(nullable id)object key:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
